package com.xbdun.facade.validatebmp.service.upload;

import java.util.Map;

import com.xbdun.common.api.XbdUnStringResult;
import com.xbdun.common.upload.request.UploadByBASE64Request;
import com.xbdun.facade.validatebmp.exceptions.ValidateBizException;
import com.xbdun.facade.validatebmp.menus.UploadFileFormat;
import com.xbdun.facade.validatebmp.request.OpenUploadReqeust;
import com.xbdun.facade.validatebmp.upload.result.UploadOpenResult;

/**
* @ClassName: OpenUploadService
* @Description: 公开获取图片信息
* @author zhanggt 360730440@qq.com
* @date 2017年5月15日 下午5:01:37
*/
public interface OpenUploadFacade{
	
	/**
	 * 获取上传文件URL地址
	 * @param id 上传文件Id
	 * @param uploadFileFormat 规格{@link UploadFileFormat}
	 * @return URL地址
	 * @throws ValidateBizException
	 */
	public XbdUnStringResult getUrl(OpenUploadReqeust request)throws ValidateBizException;
	/**
	 * 获取上传文件URL地址
	 * @param uploadFileFormat 规格{@link UploadFileFormat}
	 * @param ids 多个上传文件Id
	 * @return  Map<上传文件Id,URL>
	 */
	public Map<Long,String> getUrlsMap(OpenUploadReqeust request);
	
	/**
	 * 删除单个上传文件
	 * @param id 文件Id
	 * @return 实际删除数量
	 * @throws ValidateBizException
	 */
	public int deletes(OpenUploadReqeust request)throws ValidateBizException;
	
	/**
	* @Title: uploadByBASE64
	* @Description 上传文件到服务器
	* @param request
	* @return    设定文件
	* @return UploadOpenResult    返回类型
	 */
	public UploadOpenResult uploadByBASE64(UploadByBASE64Request request);
}
